/*
* This file is part of RoboDS (http://code.google.com/p/robods/)
* Copyright (C) 2007 Blakharaz
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
#ifndef __Game_H__
#define __Game_H__

#include "Prerequisites.h"

#include "Card.h"
#include "GameState.h"

namespace robo
{
    class AbstractJob;
    class AutomaticEffectsState;
    class MoveRobotsState;
    class PrepareRoundState;
    class Robot;
    class UserInputState;

    class Game
    {
    public:
        Game();
        virtual ~Game();

        virtual void initialize() = 0;
        virtual void run() = 0;
        virtual void destroy() = 0;

        virtual Card* createCard(Card::CardType type, int priority) = 0;
        void setCurrentState(GameState::StateType state);
        virtual void stateChanged(GameState::StateType oldState, GameState::StateType newState) = 0;
        virtual AbstractJob* createMovementJob(Robot* robot, Vector2 start, Vector2 target, int frames) = 0;
        virtual AbstractJob* createTurnJob(Robot* robot, Card::CardType type, int frames) = 0;

    protected:
         UserInputState* mUserInputState;
         AutomaticEffectsState* mAutomaticEffectsState;
         MoveRobotsState* mMoveRobotsState;
         PrepareRoundState* mPrepareRoundState;

         GameState* mCurrentState;
    };
}

#endif // __Game_H__
